/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package swym.server.file;

import java.io.Serializable;

/**
 *
 * @author mschaefer
 */
public class FileChunk implements Serializable
{
    public static final int DEFAULT_SIZE = 4096;
    
    private int offset;
    private byte[] data;
    
    public FileChunk( int offset )
    {
        this(offset,null);
    }
    
    public FileChunk( int offset, byte[] data )
    {
        this.offset = offset;
        
        this.data = data;
    }
    
    public void setData( byte[] data )
    {
        this.data = data;
    }
    
    public byte[] getData()
    {
        return data;
    }
    
    public int getOffset()
    {
        return offset;
    }
}
